package com.jsgt.greekfire.bean

import android.os.Parcel
import android.os.Parcelable

class CoinBean() : Parcelable {
    var changepercentage: String? = null
    var createTime: String? = null
    val creator: Int? = -1
    val dayhigh: Double? = null
    val daylow: Double? = null
    val deleteFlag: Int? = -1
    val fullname: String? = null
    var guid: Int? = -1
    val icon: String? = null
    var last: Double? = null
    val modifier: Int? = -1
    val modifyTime: String? = null
    var project: String? = null
    val remark: String? = null
    val symbol: String? = null
    var volume: Long? = null

    constructor(parcel: Parcel) : this() {
        changepercentage = parcel.readString()
        createTime = parcel.readString()
        guid = parcel.readValue(Int::class.java.classLoader) as? Int
        last = parcel.readValue(Double::class.java.classLoader) as? Double
        project = parcel.readString()
        volume = parcel.readValue(Long::class.java.classLoader) as? Long
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(changepercentage)
        parcel.writeString(createTime)
        parcel.writeValue(guid)
        parcel.writeValue(last)
        parcel.writeString(project)
        parcel.writeValue(volume)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<CoinBean> {
        override fun createFromParcel(parcel: Parcel): CoinBean {
            return CoinBean(parcel)
        }

        override fun newArray(size: Int): Array<CoinBean?> {
            return arrayOfNulls(size)
        }
    }


}